Skip to content

Document for local testing of UAS API#13913

Open
jinidev wants to merge 6 commits intolatestfrom
doc-UAS-api-test-local
Open

Document for local testing of UAS API#13913
jinidev wants to merge 6 commits intolatestfrom
doc-UAS-api-test-local

Conversation

@jinidev
Copy link
Copy Markdown
Contributor

@jinidev jinidev commented Apr 15, 2026

Resolves JIRA:

Summary

A Guide that provides instructions for developers to test User Activity Service (UAS) endpoints locally

Testing UAS endpoints locally requires several setup steps to handle authentication, CORS issues, and session management.
This document outlines all necessary configurations.
Included some Troubleshooting steps as well

Copilot AI review requested due to automatic review settings April 15, 2026 11:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a developer guide describing how to locally test User Activity Service (UAS) endpoints in Simorgh, covering auth/session handling and CORS constraints commonly encountered in local environments.

Changes:

  • Introduces new MDX documentation for local UAS endpoint testing
  • Describes local-only workarounds for token refresh, cookie/token handling, and CORS
  • Adds a troubleshooting section and resource links for further reading

Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
jinidev and others added 2 commits April 15, 2026 15:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member

@elvinasv elvinasv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably also mention that ckns_id is needed, otherwise we'll hide the UAS button (at least for now)

Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated

1. Install **ModHeader** extension for your browser:

2. Configure ModHeader to set the `Access-Control-Allow-Origin` header:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if we use an alias for localhost.bbc.com? Do we need to use ModHeader for this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this method. The CORS error no longer occurred, but even when I passed a valid token, the UAS APIs kept returning a 401 Unauthorized error.

Copy link
Copy Markdown
Contributor Author

@jinidev jinidev Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this again after removing the third-party cookie block removal, which was stopping the required tokens from being passed. It’s working now, so we don’t need the ModHeader extension after all.
Will update doc

Thank you @HarveyPeachey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants